﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="GroundWater._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>大沽河地下水监测系统</title>
    <%--<link href="stylesheet.css" type="text/css" rel="Stylesheet" />--%>
    <%--<script type="text/javascript" src="js/jquery.js"></script>--%>
    <script type="text/javascript" src="js/jquery-1.3.2-vsdoc.js"></script>
    <style type="text/css">
    body
    {
    	margin: 0px;
	    text-align: left;
	    font-family: Tahoma, Arial, Helvetica, sans-serif;
	    font-size: 11px;
	    background-color: #BDDEFF;
	    background-image:url('images/page_bg.png'); background-repeat:repeat-x;
	    min-width:980px;
    }
    
    .trigger a:hover{
	background-color:#FFE88C;
	border:solid 1px #D69C00;
    }
    </style>
</head>

<body onresize="resizeWindow()" onload="resizeWindow()"  >

            <div class="header">
            	<div>
	            	欢迎您 <%= HttpContext.Current.User.Identity.Name %> | <a href="javascript:openUrl('Admin/ChangePassword.aspx?'+ Math.random(), '修改用户口令');void(0);">修改用户口令</a> | <a href="javascript:signOut();void(0);">注销</a> | <a href="javascript:openUrl('help.htm','帮助');void(0);">帮助</a>
            	</div>
            	<span class="title">大沽河地下水监测系统</span><br />
            	<span style="margin-left:5px;">天佳软件: <a href="http://www.goodsoftware.com/">www.verygood.com</a></span>
            </div>
            
			<div class="toolbar">
				<div class="toolbarLeft"></div>
				<div class="toolbarContent">
					<a href="javascript:openUrl('map.aspx','自动监测井分布图');void(0);"><img src="images/45.png" alt="" />首页</a> | 
					<a href="javascript:openUrl('waterlevel/monitoringquery.aspx?'+ Math.random(),'水位数据查询');void(0);"><img src="images/41.png" alt="" />查询</a> | 
					<a href="javascript:openUrl('waterlevel/waterlevelchart.aspx?charttype=column&'+ Math.random(), '水位柱状图');void(0);"><img src="images/40.png" alt="" />柱状图</a> | 
					<a href="javascript:openUrl('waterlevel/WaterLevelByDate.aspx?'+ Math.random(), '水位曲线图');void(0);"><img src="images/54.png" alt="" />曲线图</a> |
					<a href="javascript:openUrl('waterlevel/WaterLevelQuery.aspx?'+ Math.random(), '综合查询');void(0);"><img src="images/24.png" alt="" />综合查询</a>
				</div>
				<div class="toolbarRight"></div>
				<%--<div class="clear"></div>--%>
			</div>
			<div class="toolbar">
				<div class="toolbarLeft"></div>
				<div class="toolbarContent">
					<a href="javascript:openUrl('waterlevel/WaterlevelAbnormal.aspx?'+ Math.random(), '水位异常检查');void(0);"><img src="images/31.png" alt="" />异常检查</a> | 
					<a href="javascript:openUrl('map.aspx?img=1','自动监测井分布图');void(0);"><img src="images/14.png" alt="" />地图查询</a> 
				</div>
				<div class="toolbarRight"></div>
				<%--<div class="clear"></div>--%>
			</div>
			
 			<div class="clear"></div>
 			
 			<div id="trigger" style="width:4px; height:80%; display:none; float:left; margin-right:6px;"><img id="imgTrigger2" alt="显示" src="images/default/grid/page-next.gif" title="显示导航栏" style="margin-top:10px;" /></div>
            
			<div class="navigation" id="navigation" style="display:inline; -margin-top:-18px">
            	<div class="subHeader">
            		<div><span id="navigationHeader">监测信息</span><img id="imgTrigger1" alt="隐藏" src="images/default/grid/page-prev.gif" title="隐藏导航栏" style="margin-left:40%; margin-right:10px; " /></div>
            	</div>
                <div class="navPanel">
                <div id="waterlevelRegion" style="display:block;">
                	<a href="javascript:openUrl('waterlevel/monitoringquery.aspx?' + Math.random(),'水位数据查询');void(0);"><img src="images/61.png" alt="" />水位数据查询</a>
                	<a href="javascript:openUrl('waterlevel/waterlevelchart.aspx?charttype=column&'+ Math.random(), '水位柱状图');void(0);"><img src="images/54.png" alt="" />水位柱状图</a>
                	<%--<a href="javascript:openUrl('waterlevel/waterlevelchart.aspx?charttype=pie&'+ Math.random(), '水位饼状图');void(0);"><img src="images/21.png" alt="" />水位饼状图</a>--%>
                	<a href="javascript:openUrl('waterlevel/WaterLevelByDate.aspx?'+ Math.random(), '水位曲线图');void(0);"><img src="images/54.png" alt="" />水位曲线图</a>
                	<a href="javascript:openUrl('waterlevel/CellVoltage.aspx?'+ Math.random(), '电池电压报表');void(0);"><img src="images/72.png" alt="" />电池电压报表</a>
                	<%--<a href="javascript:openUrl('waterlevel/WaterLevelQuery.aspx?'+ Math.random(), '简化后数据');void(0);"><img src="images/28.png" alt="" />简化后数据</a>--%>
                	<a href="javascript:openUrl('waterlevel/OriginalWaterLevel.aspx?'+ Math.random(), '原始数据');void(0);"><img src="images/72.png" alt="" />原始数据</a>
                	<a href="javascript:openUrl('waterlevel/WaterLevelQuery.aspx?'+ Math.random(), '综合报表');void(0);"><img src="images/28.png" alt="" />综合报表</a>
                	
                	
                </div>
                <div id="systemRegion" style="display:none;">
                    <a href="javascript:openUrl('basedata/SectionPlane.aspx?'+ Math.random(), '剖面信息维护');void(0);" ><img src="images/28.png" alt="" />剖面信息维护</a>
                	<a href="javascript:openUrl('basedata/WellQuery1.aspx?'+ Math.random(), '水井信息维护');void(0);" ><img src="images/28.png" alt="" />水井信息维护</a>
                	<a href="javascript:openUrl('Basedata/WaterSource.aspx?'+ Math.random(), '水源地信息维护');void(0);"><img src="images/61.png" alt="" />水源地信息维护</a>
                	
                	
                	<%--<a href="#"><img src="images/21.png" alt="" />参数设置</a>--%>
                	
                	
                </div>
                <div id="adminRegion" style="display:none;">
                	<a href="javascript:openUrl('Admin/usermanager.aspx?'+ Math.random(), '用户管理');void(0);"><img src="images/72.png" alt="" />用户管理</a>
                	<a href="javascript:openUrl('Admin/ChangePassword.aspx?'+ Math.random(), '更改口令');void(0);"><img src="images/72.png" alt="" />更改口令</a>
                	<a href="javascript:openUrl('waterlevel/WaterlevelUpdate1.aspx?'+ Math.random(), '监测数据录入');void(0);"><img src="images/61.png" alt="" />监测数据录入</a>
                	<%--<a href="javascript:openUrl('waterlevel/VoltageAbnormal.aspx?'+ Math.random(), '电池检查');void(0);"><img src="images/61.png" alt="" />电池检查</a>--%>
                	<a href="javascript:openUrl('waterlevel/WaterLevelWarning.aspx?'+ Math.random(), '水位检查');void(0);"><img src="images/61.png" alt="" />水位检查</a>
                </div>
                
                <div id="analysisRegion" style="display:none;">
                	<a href="javascript:openUrl('analysis/AverageWaterlevel.aspx?'+ Math.random(), '水井水位及埋深统计(单井)');void(0);" ><img src="images/54.png" alt="" />水井水位及埋深统计(单井)</a>
                	<a href="javascript:openUrl('analysis/DivisionWaterlevel.aspx?'+ Math.random(), '行政区划水位及埋深统计(多井)');void(0);" ><img src="images/54.png" alt="" />行政区划水位及埋深统计(多井)</a>
                	<a href="javascript:openUrl('analysis/SectionPlaneWaterlevel.aspx?'+ Math.random(), '剖面水位及埋深统计(全部)');void(0);" ><img src="images/54.png" alt="" />剖面水位及埋深统计(全部)</a>
                	<a href="javascript:openUrl('analysis/WaterlevelContrast.aspx?'+ Math.random(), '水位及埋深同期对比');void(0);" ><img src="images/54.png" alt="" />水位及埋深同期对比</a>
                	<a href="javascript:openUrl('waterlevel/WaterlevelAbnormal.aspx?'+ Math.random(), '水位异常检查');void(0);"><img src="images/28.png" alt="" />水位异常检查</a>
                	<%--<a href="javascript:openUrl('waterlevel/WaterlevelAbnormalQuery.aspx?'+ Math.random(), '水位异常查询');void(0);"><img src="images/28.png" alt="" />水位异常查询</a>--%>
                </div>	
                </div>
                <div class="navSelect" id="topMenu">
                	<div class="navSeparator"></div>
                	<a href="javascript:show(document.getElementById('aMonitoring'), '监测信息', 'waterlevelRegion', ['systemRegion', 'analysisRegion', 'adminRegion']);void(0);" id="aMonitoring" style="background-image:url('images/nav_link_hover.png')"><img src="images/Modify.png" alt="" />监测信息</a>
                	<a href="javascript:show(document.getElementById('aAnalysis'),   '统计分析', 'analysisRegion', ['systemRegion', 'waterlevelRegion', 'adminRegion']);void(0);" id="aAnalysis" style=""><img src="images/Modify.png" alt="" />统计分析</a>
                	<a href="javascript:show(document.getElementById('aBasedata'),   '基础数据', 'systemRegion', ['waterlevelRegion', 'analysisRegion', 'adminRegion']);void(0);" id="aBasedata" style=""><img src="images/Email.png" alt="" />基础数据</a>
                	<a href="javascript:show(document.getElementById('aAdmin'),      '系统管理', 'adminRegion', ['waterlevelRegion', 'analysisRegion', 'systemRegion']);void(0);" id="aAdmin" style=""><img src="images/BarChart.png" alt="" />系统管理</a>
                </div>
            </div>


            <div class="content" id="content" style=" margin-left:1px; -margin-top:-18px;">
            
                <form id="form1" runat="server">
            	<div class="subHeader" id="contentHeader">
            		<div id="contentTitle">自动监测井分布图</div>
            	</div>
            	<div class="contentPanel" id="contentPanel" style="height:100%; overflow:hidden;">
					<iframe id="waterQuery" name="waterQuery" src="map.aspx"  frameborder="0" style="height:100%; width:100%; overflow-x:hidden;" ></iframe>
				</div>
				
				</form>
            </div>
            <div class="clear"></div>
</body>
<script type="text/javascript">
    function resizeWindow() {
        //scrolling = "no"
        var windowHeight = getWindowHeight();

        document.getElementById("content").style.height = (windowHeight - 110) + "px";
        document.getElementById("contentPanel").style.height = (windowHeight - 134) + "px";
        document.getElementById("navigation").style.height = (windowHeight - 110) + "px";

        //var windowWidth = getWindowWidth();
        //var iframe = document.getElementById("waterQuery");
        //var content = document.getElementById("content");


        //alert(typeof (jQuery.browser.version) + " : " + jQuery.browser.version);
        //alert("window:" + jQuery(window).height());
        //alert("window:" + jQuery(window.document.body).height());
        

        if (jQuery.browser.msie && parseFloat( jQuery.browser.version) < 7) {

            //document.getElementById("content").style.width = "78%";

            //jQuery("#content").height(windowHeight - 148);
            //jQuery("#contentPanel").height(windowHeight - 172);
            
            //jQuery("#waterQuery").width(jQuery("#content").width() - 15);
            //jQuery("#waterQuery").height(jQuery("#content").height() - 35);
        }
        else {
            document.getElementById("content").style.width = "79%";
            jQuery("#waterQuery").width(jQuery("#content").width() - 6);
            jQuery("#waterQuery").height(jQuery("#content").height() - 35);
            var iframe = document.body.style.overflow = "hidden";
//            if ((jQuery.browser.msie && parseFloat(jQuery.browser.version) > 7.9)
//            || /chrome/.test(navigator.userAgent.toLowerCase()) 
//            || (jQuery.browser.mozilla)) {
//                var iframe = document.body.style.overflow = "hidden";
//            }
//            alert(navigator.userAgent);
//            alert(jQuery.browser.mozilla);
//            alert(jQuery.browser.version);
        }
       
    }

    function getWindowHeight() 
    {
        var windowHeight=0;
        if (typeof(window.innerHeight)=='number') 
        {
            windowHeight = window.innerHeight;
        }
        else {
            if (document.documentElement && document.documentElement.clientHeight) 
            {
                windowHeight = document.documentElement.clientHeight;
            }
            else 
            {
                if (document.body && document.body.clientHeight) 
                {
                    windowHeight = document.body.clientHeight;
                }
            }
        }
        return windowHeight;
    }

    function getWindowWidth() {
        var windowWidth = 0;
        if (typeof (window.innerWidth) == 'number') {
            windowWidth = window.innerWidth;
        }
        else {
            if (document.documentElement && document.documentElement.clientWidth) {
                windowWidth = document.documentElement.clientWidth;
            }
            else {
                if (document.body && document.body.clientWidth) {
                    windowWidth = document.body.clientWidth;
                }
            }
        }
        return windowWidth;
    }

    $(document).ready(function() {
        //$("#waterQuery").height($("#content").height() - 10);
        //$("#waterQuery").width($("#content").width() + 10);
        //encodeURIComponent();

        //$("#imgTrigger1").css("margin-left", w);

        $("#imgTrigger1").click(function() {
            $("#navigation").css("display", "none");
            if (jQuery.browser.msie && parseFloat(jQuery.browser.version) < 7) {
                $("#content").css("width", "97%");
            }
            else {
                $("#content").css("width", "98%");
            }
            
            $("#content").css("top", "98%");
            $("#trigger").css("display", "inline");

            var iframe = document.getElementById("waterQuery");
            if (jQuery.browser.msie && parseFloat(jQuery.browser.version) < 7) {
                iframe.style.width = "98%";
            }
            else {
                iframe.style.width = "100%";
            }

            if (iframe.src.indexOf("map.aspx", 0) >= 0) {
                //alert("map");
                var img = iframe.contentWindow.window.document.getElementById("ImageMap1");

                //img.style.width = "1200px";
                //img.style.height = "1682px";
            }
        });
        $("#imgTrigger2").click(function() {
            $("#navigation").css("display", "inline");
            //$("#content").css("width", "78%");
            if (jQuery.browser.msie && parseFloat(jQuery.browser.version) < 7) {
                $("#content").css("width", "78%");
            }
            else {
                $("#content").css("width", "79%");
            }
            $("#trigger").css("display", "none");

            var iframe = document.getElementById("waterQuery");
            if (iframe.src.indexOf("map.aspx", 0) >= 0) {
                //alert("map");
                var img = iframe.contentWindow.window.document.getElementById("ImageMap1");

                img.style.width = "683px";
                img.style.height = "950px";
            }




        });
        //onclick = "document.getElementById('navigation').style.display = 'none';"
    });

function openUrl(url, title) {
    if (title != null) {
        //alert(jQuery("#contentTitle").html()); // jQuery.support.htmlSerialize
        //alert(title);
        document.getElementById("contentTitle").innerText = title
        
        //jQuery("#contentTitle").html(encodeURIComponent(title));
    }
    var iframe = document.getElementById("waterQuery");
    iframe.src = url;
}

function signOut() {
    jQuery.get('SignOut.ashx', function(result) {
    window.location = "logon.htm"; //SignIn.aspx
    });
}

function show(el, text, region, regions) {
    //jQuery("a", "#topMenu").removeClass("mouseover");
    //jQuery(el).addClass("mouseover");
    //el.className = "mouseover";
    //alert(el);
    document.getElementById('aMonitoring').style.backgroundImage = "url('images/nav_link.png')";
    document.getElementById('aAnalysis').style.backgroundImage = "url('images/nav_link.png')";
    document.getElementById('aBasedata').style.backgroundImage = "url('images/nav_link.png')";
    document.getElementById('aAdmin').style.backgroundImage = "url('images/nav_link.png')";

    el.style.backgroundImage = "url('images/nav_link_hover.png')";
    
    document.getElementById("navigationHeader").innerText = text;
    $("#" + region).css("display", "block");
    
    for (var i = 0; i < regions.length; i++) {
        $("#" + regions[i]).css("display", "none");
    }

}

    
</script>
</html>
